//
// Created by Semir on 2020/4/28.
//

#include <iostream>
#include <vector>

using namespace std;

//const int MAX_N = 505;
const int MAX_LEN = 5005;
int n;
vector<vector<int>> arr;
vector<int> product;

void highPrecisionAdd(vector<int> &sum, vector<int> &adder) {
    int tmp = 0;
    int len = max(sum.size(), adder.size());
    sum.resize(len + 1);
    for (int i = 0; i < len; i++) {
        tmp = sum[i] + adder[i];
        sum[i + 1] += tmp / 10;
        sum[i] = tmp % 10;
    }
    if (sum[len] == 0) {
        sum.resize(len);
    }
}

void highPrecisionMulti(vector<int> &fac1, vector<int> &fac2) {
    product.clear();
    product.resize(fac1.size() + fac2.size(), 0);
    for (int i = 0; i < fac1.size(); i++) {
        for (int j = 0; j < fac2.size(); j++) {
            product[i + j] += fac1[i] * fac2[j];
        }
    }
    for (int i = 0; i < product.size() - 1; i++) {
        product[i + 1] += product[i] / 10;
        product[i] %= 10;
    }
    if (product[product.size() - 1] == 0) {
        product.resize(product.size() - 1);
    }
}

//void test01() {
//    n = 500;
//    arr.resize(n + 1, vector<int>(1, 0));
//    arr[0] = {1, 2};
//    arr[1] = {9, 7};
//    cout << arr[0].size() << " " << arr[1].size() << endl;
//    highPrecisionAdd(arr[0], arr[1]);
//    cout << arr[0].size() << endl;
//}
//
//void test02() {
//    n = 500;
//    arr.resize(n + 1, vector<int>(1, 0));
//    arr[0] = {1, 2};
//    arr[1] = {9, 7};
//    highPrecisionMulti(arr[0], arr[1]);
//    cout << product.size() << endl;
//}

int main() {
    cin >> n;
    arr.resize(n + 1, vector<int>(1, 0));
    arr[0][0] = 1;
    arr[1][0] = 1;
    for (int i = 2; i <= n; i++) {
        for (int j = i - 1; j >= 0; j--) {
//            arr[i] += arr[j] * arr[i - 1 - j];
            highPrecisionMulti(arr[j], arr[i - 1 - j]);
            highPrecisionAdd(arr[i], product);
        }
    }
    for (int i = arr[n].size() - 1; i >= 0; i--) {
        cout << arr[n][i];
    }
    cout << endl;
    return 0;
}